import java.util.Scanner;

public class Homework_603_8 {
public static void main(String[] args) {
	//8：如果斐波拉切数列的前N项，N由用户输入。斐波拉切数列的定义是前两个是1，后面的每一个是前面的两个和，比如N是5,则输出结果是1,1,2,3,5
	Scanner input = new Scanner(System.in);
		System.out.println("请输入N的值：");
	int n = input.nextInt();
		int a = 1, b = 1, num = 0;
		System.out.print("" + a + " ");
		System.out.print("" + b + " ");
		for (int i = 0; i < n - 2; i++) {
			num = a + b;
			a = b;
			b = num;
			System.out.print(num + " ");
		}
	}
}

